#在linux上运行，需要安装xvfb和chromedriver.exe
from selenium import webdriver
from pyvirtualdisplay import Display

display = Display(visible=0,size=(800,600))
display.start()
driver = webdriver.Chrome()
driver.get("http://www.baidu.com")
print(driver.page_source.encode('utf-8'))
driver.quit()
display.stop()
